package com.blb.wuliu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

/**
 * @author lvtian
 * @date 2023/1/4 19:05
 */
@TableName("w_log")
public class Log {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer goodId;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private Integer amount;
    private Integer startAddressId;
    private Integer endAddressId;
    @TableField(exist = false)
    private Good good;
    @TableField(exist = false)
    private Address startAddress;
    @TableField(exist = false)
    private Address endAddress;

    public Address getStartAddress() {
        return startAddress;
    }

    public void setStartAddress(Address startAddress) {
        this.startAddress = startAddress;
    }

    public Address getEndAddress() {
        return endAddress;
    }

    public void setEndAddress(Address endAddress) {
        this.endAddress = endAddress;
    }

    public Good getGood() {
        return good;
    }

    public void setGood(Good good) {
        this.good = good;
    }

    public Log() {
    }

    public Log(Integer id, Integer goodId, LocalDateTime startTime, LocalDateTime endTime, Integer amount, Integer startAddressId, Integer endAddressId) {
        this.id = id;
        this.goodId = goodId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.amount = amount;
        this.startAddressId = startAddressId;
        this.endAddressId = endAddressId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getGoodId() {
        return goodId;
    }

    public void setGoodId(Integer goodId) {
        this.goodId = goodId;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    public Integer getStartAddressId() {
        return startAddressId;
    }

    public void setStartAddressId(Integer startAddressId) {
        this.startAddressId = startAddressId;
    }

    public Integer getEndAddressId() {
        return endAddressId;
    }

    public void setEndAddressId(Integer endAddressId) {
        this.endAddressId = endAddressId;
    }

    @Override
    public String toString() {
        return "Log{" +
                "id=" + id +
                ", goodId=" + goodId +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", amount=" + amount +
                ", startAddressId=" + startAddressId +
                ", endAddressId=" + endAddressId +
                '}';
    }
}
